import os
import sys
import posixpath
from django.conf import settings


BASE_DIR = os.path.dirname(__file__)
STATIC_ROOT = os.path.join(os.path.dirname(__file__),'static');

settings.configure(DUBUG = True,
	SECRET_KEY = 'thisisthesecrekey',
	ROOT_URLCONF = 'sitebulider.urls',
	ALLOWED_HOSTS = ['*'],
	MIDDLEWARE_CLASSES = ('django.middleware.common.CommonMiddleware',
		'django.middleware.csrf.CsrfViewMiddleware',
		'django.middleware.clickjacking.XFrameOptionsMiddleware',),
	INSTALLED_APPS=['sitebulider','django.contrib.staticfiles',],
	TEMPLATES=[{
			'BACKEND': 'django.template.backends.django.DjangoTemplates',
			'DIRS':[os.path.join(BASE_DIR, 'sitebulider/templates')],
			'APP_DIRS':True,
		},],
	STATIC_URL = '/sitebulider/static/',
	SITE_PAGE_DIRECTORY = os.path.join(BASE_DIR,'pages'),
	SITE_OUTPUT_DIRECTORY=os.path.join(BASE_DIR,'_build'),
	STATIC_ROOT=os.path.join(BASE_DIR,'_build','static'),
	STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage',)




if __name__ == "__main__":
    from django.core.management import execute_from_command_line
    execute_from_command_line(sys.argv)

